<#assign cPath = request.contextPath + "/" + Request.actionurl!''>
<script type="text/javascript">
	function resetPageInfo(){
		document.opForm.param_curpage.value = "1";
	    document.opForm.param_ipagecount.value = "20";
	}
	function page() {
	    layui.use('laypage', function(){
			var laypage = layui.laypage;
			laypage.render({
				elem: 'pagehelper',
				//一共多少条
				count: parseInt($("#param_totalCount").val().replace(/[^0-9]/ig, "")),//i-区分大小写， g全局
				layout: ['prev', 'page', 'next', 'skip', 'count', 'limit'],
			    //起始页
				first: 1,
				//每页条数
				limit: parseInt($("#param_ipagecount").val().replace(/[^0-9]/ig, "")),
			    limits: [20, 50, 100],
			    //当前页
				curr: function() {
					return $("#param_curpage").val() == "" ? 1 : parseInt($("#param_curpage").val());
			    }(),
			    //一共多少页
			    pages: function() {
					return $("#param_totalPage").val() == "" ? 1 : parseInt($("#param_totalPage").val());
			    }(),
				//最后一页
			    last: function() {
					return $("#param_totalPage").val() == "" ? 1 : parseInt($("#param_totalPage").val());
			    }(),
			    //跳到第几页
				jump: function(obj, first){
				    if (!first) {
					    $("#param_curpage").val(obj.curr);
					    $("#param_ipagecount").val(obj.limit);
					    document.opForm.action="${cPath!}";
					    document.opForm.submit();
					}
				}
			});
		});
	}
</script>
<div id="pagehelper" data-type="paged" class="btable-paged"></div>
<input type="hidden" name="param_curpage" id="param_curpage" value="${Request.param_curpage!}" />
<input type="hidden" name="param_ipagecount" id="param_ipagecount" value="${Request.param_ipagecount!}" />
<input type="hidden" id="param_totalPage" value="${Request.param_totalPage!}" />
<input type="hidden" id="param_totalCount" value="${Request.param_totalCount!}" />
